package com.ty.controller;

import com.ty.pojo.Partner;
import com.ty.service.PartnerService;
import com.ty.vo.PageResult;
import com.ty.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@RestController
@CrossOrigin
@EnableSwagger2
@RequestMapping("/partner")
public class PartnerController {
    @Autowired
    private PartnerService partnerService;
    //查询伙伴表
    @GetMapping("/getPartnerList")
    public SysResult getPartnerList(@RequestBody PageResult pageResult, Partner partner){
        pageResult = partnerService.getPartnerList(pageResult,partner);
        return SysResult.success(pageResult);
    }
}
